<script setup lang='ts'>

const inputChange = (e: Event) => {
  console.log((e.target as HTMLInputElement).value);
}
const onEnter = (e: KeyboardEvent) => {
  console.log(e.key);
}
const clickMe = (e: MouseEvent) => {
  console.log(e.altKey);
}

</script>

<template>
  <div>
    <input type="text" @input="inputChange" @keyup.enter="onEnter">
    <button @click="clickMe">点我</button>
  </div>
</template>

<style scoped></style>